<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SDL_gfx: I:/Sources/sdlgfx/SDL_gfxBlitFunc.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">SDL_gfx
   &#160;<span id="projectnumber">2.0.25</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">I:/Sources/sdlgfx/SDL_gfxBlitFunc.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_s_d_l__gfx_blit_func_8h_source.html">SDL_gfxBlitFunc.h</a>&quot;</code><br/>
</div>
<p><a href="_s_d_l__gfx_blit_func_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a7ec9cde56a58eee4e6182c32dd8cbee7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#a7ec9cde56a58eee4e6182c32dd8cbee7">_SDL_gfxBlitBlitterRGBA</a> (<a class="el" href="struct_s_d_l__gfx_blit_info.html">SDL_gfxBlitInfo</a> *info)</td></tr>
<tr class="memdesc:a7ec9cde56a58eee4e6182c32dd8cbee7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal blitter using adjusted destination alpha during RGBA-&gt;RGBA blits.  <a href="#a7ec9cde56a58eee4e6182c32dd8cbee7"></a><br/></td></tr>
<tr class="memitem:a9375eac21cc799258f971034a3be57b5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#a9375eac21cc799258f971034a3be57b5">_SDL_gfxBlitRGBACall</a> (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)</td></tr>
<tr class="memdesc:a9375eac21cc799258f971034a3be57b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal blitter setup wrapper for RGBA-&gt;RGBA blits.  <a href="#a9375eac21cc799258f971034a3be57b5"></a><br/></td></tr>
<tr class="memitem:ac51ff40d39f3dd0bd08116e8953960f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#ac51ff40d39f3dd0bd08116e8953960f8">SDL_gfxBlitRGBA</a> (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)</td></tr>
<tr class="memdesc:ac51ff40d39f3dd0bd08116e8953960f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blitter for RGBA-&gt;RGBA blits with alpha adjustment.  <a href="#ac51ff40d39f3dd0bd08116e8953960f8"></a><br/></td></tr>
<tr class="memitem:a09a376775f9d8c933c7121e34fe5ecfc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#a09a376775f9d8c933c7121e34fe5ecfc">SDL_gfxSetAlpha</a> (SDL_Surface *src, Uint8 a)</td></tr>
<tr class="memdesc:a09a376775f9d8c933c7121e34fe5ecfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the alpha channel in a 32 bit surface.  <a href="#a09a376775f9d8c933c7121e34fe5ecfc"></a><br/></td></tr>
<tr class="memitem:a4ece530dca0ae46b1f5a780f85371687"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#a4ece530dca0ae46b1f5a780f85371687">SDL_gfxMultiplyAlpha</a> (SDL_Surface *src, Uint8 a)</td></tr>
<tr class="memdesc:a4ece530dca0ae46b1f5a780f85371687"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply the alpha channel in a 32bit surface.  <a href="#a4ece530dca0ae46b1f5a780f85371687"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a6d0c17342154e14322a281603960691a"><td class="memItemLeft" align="right" valign="top">const unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__gfx_blit_func_8c.html#a6d0c17342154e14322a281603960691a">GFX_ALPHA_ADJUST_ARRAY</a> [256]</td></tr>
<tr class="memdesc:a6d0c17342154e14322a281603960691a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alpha adjustment table for custom blitter.  <a href="#a6d0c17342154e14322a281603960691a"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7ec9cde56a58eee4e6182c32dd8cbee7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="_s_d_l__gfx_blit_func_8c.html#a7ec9cde56a58eee4e6182c32dd8cbee7">_SDL_gfxBlitBlitterRGBA</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_d_l__gfx_blit_info.html">SDL_gfxBlitInfo</a> *&#160;</td>
          <td class="paramname"><em>info</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal blitter using adjusted destination alpha during RGBA-&gt;RGBA blits. </p>
<p>Performs the blit based on the 'info' structure and applies the transfer function to the destination 'a' values.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">info</td><td>The blit info to use. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00306">306</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9375eac21cc799258f971034a3be57b5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__gfx_blit_func_8c.html#a9375eac21cc799258f971034a3be57b5">_SDL_gfxBlitRGBACall</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Rect *&#160;</td>
          <td class="paramname"><em>srcrect</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Rect *&#160;</td>
          <td class="paramname"><em>dstrect</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal blitter setup wrapper for RGBA-&gt;RGBA blits. </p>
<p>Sets up the blitter info based on the 'src' and 'dst' surfaces and rectangles.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The source surface. </td></tr>
    <tr><td class="paramname">srcrect</td><td>The source rectangle. </td></tr>
    <tr><td class="paramname">dst</td><td>The destination surface. </td></tr>
    <tr><td class="paramname">dstrect</td><td>The destination rectangle.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Returns 1 if blit was performed, 0 otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00356">356</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac51ff40d39f3dd0bd08116e8953960f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__gfx_blit_func_8h.html#ab49c560e89b8305051b2e6b347215f03">SDL_gfxBlitRGBA</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Rect *&#160;</td>
          <td class="paramname"><em>srcrect</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Rect *&#160;</td>
          <td class="paramname"><em>dstrect</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Blitter for RGBA-&gt;RGBA blits with alpha adjustment. </p>
<p>Verifies the input 'src' and 'dst' surfaces and rectangles and performs blit. The destination clip rectangle is honored.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The source surface. </td></tr>
    <tr><td class="paramname">srcrect</td><td>The source rectangle. </td></tr>
    <tr><td class="paramname">dst</td><td>The destination surface. </td></tr>
    <tr><td class="paramname">dstrect</td><td>The destination rectangle.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Returns 1 if blit was performed, 0 otherwise, or -1 if an error occured. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00411">411</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
<a class="anchor" id="a4ece530dca0ae46b1f5a780f85371687"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__gfx_blit_func_8h.html#a7c93594525ae349b5cef0156b8f758fc">SDL_gfxMultiplyAlpha</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Uint8&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Multiply the alpha channel in a 32bit surface. </p>
<p>Helper function that multiplies the alpha channel in a 32 bit surface with a constant value. The final alpha is always scaled to the range 0-255 (i.e. the factor is a/256).</p>
<p>Only 32 bit surfaces can be used with this function.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the target surface to change. </td></tr>
    <tr><td class="paramname">a</td><td>The alpha value to multiply with. When a is 255, this function is a NoOp.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Returns 1 if alpha was changed, 0 otherwise. Returns -1 if input surface is invalid. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00587">587</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
<a class="anchor" id="a09a376775f9d8c933c7121e34fe5ecfc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="_s_d_l__gfx_blit_func_8h.html#a4627ae4a0037d0b248bed87f3c294735">SDL_gfxSetAlpha</a> </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Uint8&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the alpha channel in a 32 bit surface. </p>
<p>Helper function that sets the alpha channel in a 32 bit surface to a constant value. Only 32 bit surfaces can be used with this function.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Pointer to the target surface to change. </td></tr>
    <tr><td class="paramname">a</td><td>The alpha value to set.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>Returns 1 if alpha was changed, -1 otherwise. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00524">524</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a6d0c17342154e14322a281603960691a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned int <a class="el" href="_s_d_l__gfx_blit_func_8h.html#a6d0c17342154e14322a281603960691a">GFX_ALPHA_ADJUST_ARRAY</a>[256]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Alpha adjustment table for custom blitter. </p>
<p>The table provides values for a modified, non-linear transfer function which maintain brightness. </p>

<p>Definition at line <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html#l00039">39</a> of file <a class="el" href="_s_d_l__gfx_blit_func_8c_source.html">SDL_gfxBlitFunc.c</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
